<html>
    <head>
        <title>清Q</title>
    </head>
    <body>
        <div id="clear_Q_form" class="x-form-item">
        </div>
        <div id="qGrid" class="x-form-item">
        </div>

        <script>
            Ext.onReady(function(){
                var resultQT = new Ext.form.TextArea({
                    fieldLabel: 'QT结果',
                    name: 'result_qt',
                    height: 80,
                    anchor: '90%',
                    value: '<%=@res%>'
                });
                var part = new Ext.form.TextField({
                    fieldLabel: '信箱代码',
                    name: 'part',
                    width: '50',
                    allowBlank: false,
                    value: 'SC'
                });

                var submitButton = new Ext.Button({
                    text: '查看',
                    handler: function(){
                        
                        ds.baseParams.part = part.getValue();
                        ds.reload();

                    }
                });

                var formPanel = new Ext.form.FormPanel({
                    //baseCls: 'x-plain',
                    labelWidth: 65,
                    width: '100%',
                    frame: true,
                    title: 'Q结果查看',
                    labelAlign: 'right',
                    items: [resultQT, {
                            layout: 'column',
                            //border: false,
                            items: [{
                                    columnWidth: .25,
                                    layout: 'form',
                                    //border: false,
                                    items: part
                                }, {
                                    columnWidth: .75,
                                    labelWidth: 55,
                                    layout: 'form',
                                    //border: false,
                                    items: submitButton
                                }]
                        }]
                });

                formPanel.render('clear_Q_form');

                var cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), {
                        header: '信息',
                        dataIndex: 'info',
                        width: 700
                    }]);

                var ds = new Ext.data.Store({
                    proxy: new Ext.data.HttpProxy({
                        url: "/orders/getQ"
                    }),
                    reader: new Ext.data.JsonReader({
                        root: 'root'
                    }, ['info'])
                });

                var qGridpanel = new Ext.grid.GridPanel({
                    el: 'qGrid',
                    ds: ds,
                    cm: cm,
                    loadMask: true,
                    autoWidth: true,
                    collapsible: true,
                    animCollapse: true,
                    height: 400,
                    //frame: true,
                    title: 'Q信息'
                });

                qGridpanel.render();
                //ds.load();

            });
        </script>
    </body>
</html>
